package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.SpokenHome;
import com.ruoyi.system.mapper.SpokenHomeMapper;
import com.ruoyi.system.service.ISpokenHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpokenHomeServiceImpl implements ISpokenHomeService {

    @Autowired
    SpokenHomeMapper homeMapper;

    /**
     * 添加模块
     * @param home
     * @return
     */
    @Override
    public int insert(SpokenHome home) {
        return homeMapper.insert(home);
    }

    /**
     * 更新模块
     * @param home
     * @return
     */
    @Override
    public int update(SpokenHome home) {
        return homeMapper.update(home);
    }

    /**
     * 根据模块ID查询模块信息
     * @param homeId
     * @return
     */
    @Override
    public SpokenHome getById(Long homeId) {
        return homeMapper.getById(homeId);
    }

    /**
     * 查询所有首页模块
     * @param home
     * @return
     */
    @Override
    public List<SpokenHome> selectList(SpokenHome home) {
        return homeMapper.selectList(home);
    }
}
